<!DOCTYPE html>
<html lang="en" class="no-js">

<head>

    <meta charset="utf-8">
    <title>管理员登录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- CSS -->
    <link rel="stylesheet" href="../static/css/reset.css">
    <link rel="stylesheet" href="../static/css/supersized.css">
    <link rel="stylesheet" href="../static/css/style.css">

    <script src="../static/js/jquery-1.12.4.min.js"></script>
    <script src="../static/js/AdminLogin.js"></script>
    <link rel="stylesheet" href="../static/css/index.css">

</head>

<body oncontextmenu="return false">

<div class="page-container">
    <h1>Login</h1>
    <form action="" method="post">
        <div>
            <input type="text" id="adminuser" name="username" class="username" placeholder="Username" autocomplete="off"/>
        </div>
        <div>
            <input type="password" id="adminpsw" name="password" class="password" placeholder="Password" oncontextmenu="return false"
                   onpaste="return false"/>
        </div>
        <button id="Adminloginbtn" type="button">登录</button>
    </form>
    <div class="connect">
        <p style="color: black">We want to have the most simple life, with the most distant dream. Even if tomorrow, lu yao horse died!</p>
        <p style="margin-top:20px;color: black">我们要有最朴素的生活，与最遥远的梦想。即使明日天寒地冻，路遥马亡！</p>
    </div>
</div>
<div class="alert" style="display:none">
    <h2>消息</h2>
    <div class="alert_con">
        <p id="ts"></p>
        <p style="line-height:70px"><a class="btn">确定</a></p>
    </div>
</div>

<!-- Javascript -->
<script src="http://apps.bdimg.com/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
<script src="../static/js/supersized.3.2.7.min.js"></script>
<script src="../static/js/supersized-init.js"></script>
<script>
    $(".btn").click(function () {
        is_hide();
    })
    var u = $("input[name=username]");
    var p = $("input[name=password]");
    $("#submit").live('click', function () {
        if (u.val() == '' || p.val() == '') {
            $("#ts").html("用户名或密码不能为空~");
            is_show();
            return false;
        }
        else {
            var reg = /^[0-9A-Za-z]+$/;
            if (!reg.exec(u.val())) {
                $("#ts").html("用户名错误");
                is_show();
                return false;
            }
        }
    });
    window.onload = function () {
        $(".connect p").eq(0).animate({"left": "0%"}, 600);
        $(".connect p").eq(1).animate({"left": "0%"}, 400);
    }
    function is_hide() {
        $(".alert").animate({"top": "-40%"}, 300)
    }
    function is_show() {
        $(".alert").show().animate({"top": "45%"}, 300)
    }
</script>
</body>

</html>

